home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
allfiles
/
angry
/
main.dir
/
00011_Script_main_loop
< prev
next >
Wrap
Text File
|
1999-03-01
|
3KB
|
116 lines
global gScroll
global gUpScr, gDownScr
global oldMouseP
global drops
global cursorSpr
on enterFrame
-- main cursor
set mouseP = point(the mouseH, the mouseV)
if inside(mouseP, rect(0, 0, 640, 480)) then cursor 200
-- else cursor -1
set diffP = mouseP - oldMouseP
set horiz = getAt(diffP, 1)
set vert = getAt(diffP, 2)
set drop = TRUE
if horiz < -5 then
if vert < -5 then
set the member of sprite(cursorSpr) to member "northwest"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "southwest"
else
set the member of sprite(cursorSpr) to member "west"
end if
else if horiz > 5 then
if vert < -5 then
set the member of sprite(cursorSpr) to member "northeast"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "southeast"
else
set the member of sprite(cursorSpr) to member "east"
end if
else
if vert < -5 then
set the member of sprite(cursorSpr) to member "north"
else if vert > 5 then
set the member of sprite(cursorSpr) to member "south"
else
set the member of sprite(cursorSpr) to member "stop"
set drop = FALSE
end if
end if
set the loc of sprite cursorSpr to mouseP
-- little droplets
repeat with a = 1 to count(drops)
set doMe = getAt(drops, a)
check doMe
end repeat
if random(2) = 2 AND drop then
repeat with a = 1 to count(drops)
set doMe = getAt(drops, a)
if not(the pActiveDrop of doMe) then
drop doMe, cursorSpr
exit repeat
end if
end repeat
end if
set oldMouseP = point(the mouseH, the mouseV)
-- scrolling
if the mouseV > getAt(gUPScr, 1) AND the mouseV < getAt(gUpScr, 2) then
-- scroll Up
repeat with a = 1 to count(gScroll)
scroll getAt(gScroll, a), 1, 25
end repeat
repeat with a = 1 to count(drops)
scrollDrops getAt(drops, a), 1, 25
end repeat
updatestage
else if the mouseV > getAt(gDownScr, 1) AND the mouseV < getAt(gDownScr, 2) then
-- scroll Down
repeat with a = 1 to count(gScroll)
scroll getAt(gScroll, a), -1, 25
end repeat
repeat with a = 1 to count(drops)
scrollDrops getAt(drops, a), -1, 25
end repeat
updateStage
end if
end
on exitFrame
go to the frame
end